// import axios from 'axios'
declare var axios: anyObj
interface arg1 {
  domain?: string
  method: string
  api: string
  config: anyObj,
  callback?: Function
}
function domain(
  arg: arg1
) {
  document.domain = arg.domain ? arg.domain : location.origin
  return axios[arg.method](arg.api, arg.config)
}
export default domain
